<%--
  Created by IntelliJ IDEA.
  User: Cool
  Date: 2023/10/24
  Time: 14:44
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%--<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>--%>
<html>
<head>
    <title>Title</title>
</head>
<body>
<jsp:useBean id="email" class="com.test.entity.addEmail"></jsp:useBean>
<jsp:setProperty name = "email"  property = "*"/>
<jsp:setProperty name = "email"  property = "sex"/>
<jsp:setProperty name ="email"  property = "textarea" param="description" />
<jsp:setProperty name ="email"  property = "password" value="123456"/>
<%email.setSex("非性别"); %>
    <table border="1">
        <tr>
            <td>邮箱地址</td>
            <td>真实姓名</td>
            <td>出生日期</td>
            <td>性别</td>
            <td>杂志订阅</td>
            <td>备注</td>
        </tr>
        <%--数据--%>
        <tr>
            <td><jsp:getProperty property="email" name="email"/></td>
            <td><jsp:getProperty property="username" name="email"/></td>
            <td><jsp:getProperty property="datetime" name="email"/></td>
            <td><jsp:getProperty property="sex" name="email"/></td>
            <td>
                <%String habbit[]=email.getCheckbox();
                    int i = 0;
                    String habbits = "";
                    for (i = 0; i < habbit.length; i++) {
                        habbits += habbit[i];
                        if (i != habbit.length - 1)
                            habbits += ",";
                    }
                    out.print(habbits);
                %>
            </td>
            <td><%=email.getTextarea()%></td>
        </tr>
    </table>

</body>
</html>
